import requests, json

#高德api天气查询
def weather(key, city):
    """ 高德api天气查询 """
    url = "https://restapi.amap.com/v3/weather/weatherInfo?parameters"
    city = city
    params = {
        "key":key,
        "city":city,
    }
    
    response = requests.get(url,params=params)
    results = response.json()
    return results